package com.flame.workflow.ru.trigger;

import com.flame.workflow.re.entity.Node;
import com.flame.workflow.ru.engine.context.RuntimeContext;
import com.flame.workflow.ru.entity.Task;

@WorkflowTriggerTask(value = TriggerTask.DEFAULT_TRIGGER_TASK, desc = "默认触发器")
public class DefaultTriggerTask implements TriggerTask {
    @Override
    public boolean invoke(RuntimeContext runtimeContext) {
        Node node = runtimeContext.getNode();
        Task task = runtimeContext.getTask();
        System.out.println(
                task.getTaskId() + ":" + task.getBranchTaskId() + ":" + node.getNodeProperties().get("triggerTarget"));
        return true;
    }
}
